package com.zy.pigchat_server.exception;

import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

/**
 * @author 这是那头猪？
 * @version 1.0
 * @description:  自定义异常处理器类
 * @date 2023/7/26 14:20
 */
@Slf4j
@RestControllerAdvice
public class GlobalExceptionHandler {

    @ExceptionHandler(AuthCheckException.class)
    public String authCheckHandle(Exception ex){
        log.info(ex.getMessage());
        return ex.getMessage();
    }
}